#include <stdio.h>

const char* dev = "/dev/pts/1";

int main()
{
	FILE* pf = fopen(dev, "w");
	if(pf == NULL)
	{
		perror("fopen operation failed");
		return;
	}
	int count = 10;
	while(count--)
	{
		fprintf(pf,"hello linux\n");
		sleep(1);	
	}	
	fclose(pf);	

	return 0;
}
